package main

import (
	"token-centre/global"
	"token-centre/middleware"

	"github.com/gin-gonic/gin"
)

func init() {
	global.InitDb()
	global.ConfigInit()
}

func main() {

	gin.SetMode(gin.ReleaseMode)
	r := gin.New()
	// r := gin.Default()

	r.SetTrustedProxies(nil)
	// r.Use(gin.Logger())
	r.Use(middleware.Recover)

	router(r)

	r.Run() // listen and serve on 0.0.0.0:8080 (for windows "localhost:8080")
}
